package com.ypj.community.dao;

import com.ypj.community.domain.DiscussPost;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DiscussPostMapper {
    List<DiscussPost> selectDiscussPosts(@Param("userId") Integer userId,@Param("offset") Integer offset,@Param("limit") Integer limit,@Param("orderMode") int orderMode);
    Integer selectDiscussPostRows(@Param("userId") Integer userId);
    Integer insertDiscussPost(DiscussPost discussPost);
    DiscussPost selectDiscussPostById(int id);
    //更新评论数量
    int updateCommentCount(@Param("id") int id,@Param("commentCount") int commentCount);

    int updateType(@Param("id") int id,@Param("type") int type);

    int updateStatus(@Param("id") int id,@Param("status") int status);

    int updateScore(@Param("id") int id,@Param("score") double score);
}